<template lang="html">
  <div class="cart">
    <list ischeck='true'></list>
		<tj></tj>
    <footer>
			<div v-if='!checked' class="check uncheck" @click='check'><i class="yo-ico">&#xe72f;</i><span>全选</span></div>
	  	<div v-if='checked' class="check" @click='check'><i class="yo-ico">&#xe730;</i><span>全选</span></div>		<!--选中-->
    	<div class="pay">
    		<span>共计</span>
    		<span><i class="yo-ico">&#xe635;</i>7.08</span>
    		<span>立减<i class="yo-ico">&#xe635;</i></span>
    		<span>5</span>
    	</div>
    	<div class="btn">
    		 去结算
    	</div>
    </footer>
  </div>
</template>

<script>
import list from './car/Car-list.vue'
import tj from './car/Car-tj.vue'

export default {
  components: {
  	list,
  	tj
  },
	created (){
      this.$emit('viewIn',"购物车");
  },
	data(){
		return {
      checked:"flase"
    }
	},
	methods: {
    check(){
    	this.checked = !this.checked
    }
 },
  mounted() {
		this.$store.commit('changeIndex', 3)
		this.$store.state.tabIndex === 3
	},
}
</script>
